<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录</title>
<%@ include file="../web/header.jsp"%>
</head>

<body>
<fieldset id="">
<legend class="layui-btn">账号登录</legend>
<form class =  "layui-form" method ="post">
<div class ="layui-form-item">
 	<label class="layui-form-label">账号</label>
 		<div class="layui-input-block">
   		<input class="layui-input" name="account" style="width:150px" placeholder="请输入账号"  title="账号"></input>
 		</div>

</div>

<div class="layui-form-item">
   <label class ="layui-form-label">密码</label>
   <div class="layui-input-block">
   <input type="text" name="password" placeholder="请输入密码" class="layui-input" style="width:150px">
   
   </div>  

</div>
  
</div>
<div class="layui-form-item">
   <label class ="layui-form-label">验证码</label>
   <div class="layui-input-block">
   <img src="/StudentMangers/AuthCodeServlet"
			   onclick="this.src ='/StudentMangers/AuthCodeServlet?'+Math.random();"> 
   <input type="text" name="code" placeholder="请输入验证码" class="layui-input" style="width:150px">
   
   </div>
   

</div>



<div class="layui-form-itme">
<input type="button" name ="action" value="登录" lay-submit lay-filter="login" class="layui-btn"></input>

<a href ="/StudentMangers/web/register.jsp" class="layui-btn">注册</a>
<button type="reset"  title="重置"  class="layui-btn">重置</button>

</div>

</form>
</fieldset>

</body>
<script src="./static/js/base.js">
</script>
<script type="text/javascript">

formSubmit("/StudentMangers/RegisterServlet","submit(login)","text",function(data){
	if(data=="登录成功"){
		/* layer.msg("登录成功"); */
		window.location="/StudentMangers/web/page/index.jsp";
	}else{
		layer.msg(data);
	}
})





</script>
</html>